import request from '@/utils/request'

export function searchUser(name) {
  return request({
    url: `/search/user`,
    method: 'get',
    params: { username: name }
  })
}

export function transactionList(query) {
  return request({
    url: '/transaction/list',
    method: 'get',
    params: query
  })
}

export function searchCategory(query) {
  return request({
    url: `/search/category`,
    method: 'get',
    params: query
  })
}

export function searchTags(tagName) {
  return request({
    url: '/search/tags', // 假地址 自行替换
    method: 'get',
    params: { tags: tagName }
  })
}
